package com.androidxmpp.config;

import java.util.ArrayList;

import android.provider.BaseColumns;

public class ChatConstants implements BaseColumns {

	private ChatConstants() {
	}

	public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.yaxim.chat";
	public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.yaxim.chat";
	public static final String DEFAULT_SORT_ORDER = "_id ASC"; // sort by
																// auto-id

	public static final String DATE = "date";
	public static final String DIRECTION = "from_me";
	public static final String JID = "jid";
	public static final String MESSAGE = "message";
	public static final String DELIVERY_STATUS = "read"; // SQLite can not
															// rename
															// columns,
															// reuse old
															// name
	public static final String PACKET_ID = "pid";

	// boolean mappings
	public static final int INCOMING = 0;
	public static final int OUTGOING = 1;
	public static final int DS_NEW = 0; // < this message has not been
										// sent/displayed yet
	public static final int DS_SENT_OR_READ = 1; // < this message was sent
													// but not yet acked, or
													// it was received and
													// read
	//代表该消息已被对方阅读，实际本项目并未用上此状态，有点小问题
	public static final int DS_ACKED = 2; // < this message was XEP-0184
											// acknowledged

	public static ArrayList<String> getRequiredColumns() {
		ArrayList<String> tmpList = new ArrayList<String>();
		tmpList.add(DATE);
		tmpList.add(DIRECTION);
		tmpList.add(JID);
		tmpList.add(MESSAGE);
		return tmpList;
	}

}
